In a computer, it is possible to recover a file that is lost by a human error, a physical failure, or infection of a computer virus through a backup. Files are backed up periodically or non-periodically. Also, a backup system is known in which a generation management is performed such that not only a file previous to the backup but also a file previous to the previous file are saved.
In the file generation management, all the files over several generations are saved. Thus, when the number of generations increases, a storage capacity for backup becomes increased. Therefore, a difference management method has become spread, in which a difference between a previous backed-up file and a current backed-up file is detected, and the difference is recorded as a previous file data, in order to reduce the storage capacity for backup.
A data backup apparatus is disclosed in Japanese Patent Application Publication (JP-P2006-178645A). The data backup apparatus compares a previously backed-up file data and a currently backed-up file data under a same file name, determining a difference between these file data, and stores the difference as old generation backup data. Meanwhile, the currently backed-up file is stored as latest generation backup data. In this way, it is possible to suppress an increase in the storage capacity required for the backup, even if the number of generations of a file to be backed up becomes increased.
However, in a technique disclosed in Japanese Patent Application Publication (JP-P2006-178645A), the file difference management is performed to the files with a same file name. If a file has a different file name, the file is treated as a different file. Therefore, it is not possible to take out only the data that is simply added as a difference, in case of a file whose name is changed by using an event as a trigger, as in a system log of Linux, for example.
Further, the difference can be taken out only by comparing files, even if the file names are the same. Therefore, when comparing the files, it is necessary to keep all the file data in the previous difference detection (when backed up).
Further, in case of a file management method in which data are deleted in order from an oldest one so that the stored data does not exceed a specific size (e.g., a case of a file management method which utilizes timestamps to sort and take out data that having the timestamps from a database), positions of the same data on the files become shifted. Thus, when the contents thereof are simply compared, already taken out data may be detected as newly added data.